moved assets to $assets global variable