implemented basic fucntionality.