changed various functionality