Separate utils functions