First commit - converted to client script