tried to make it more standalone