made prettier and functional