code style updated to follow readbeanphp library style