Updated to work also in client side for development purposes