used static functions whenever possible