added pattern table fetching functions... not very useful for now