start implemention as jquery plugin