revamped naming and added more functionality