added remaining functionality, fixed chrome bug