trying to prettify the code