edited out non-working functions