fixed some functionality