Copyright (c) patrick 2007